package com.onlyyou.user.service;

import com.onlyyou.user.entity.User;
import com.onlyyou.user.info.UserInfo;

import java.util.List;
import java.util.Map;

/**
 * @Author: 小野
 * @Date: 2020/1/12 15:42
 */
public interface UserService {

    //查询总行数
    Integer queryRows();

    //查询登录状态
    UserInfo findStatus(Long userId);

    //通过ID查询
    UserInfo findById(Long userId);

    //获取用户信息
    public Map<String, Object> getUser(String username, String password);

    //插入用户
    public Map<String, Object> insertUser(String username, String password);

    //注销
    void logout(String username);

    //后台登录
    UserInfo adminLogin(String username,String password);

    //普通登录
    UserInfo login(String username,String password);

    public List<User> findAll(Long userId,Integer pages,Integer rows);

    public UserInfo findByName(String username);

    UserInfo add(UserInfo user);

    User update(User user);
}
